//
//  RegisterController.m
//  DYLYJ
//
//  Created by JM on 15/10/24.
//  Copyright © 2015年 JM. All rights reserved.
//

#import "RegisterController.h"
#import "DYRequestAll.h"
#import "DYUIKit.h"
#import <SDWebImage/UIImageView+WebCache.h>
#import "DYServer.h"
#import "RegisterSecurityCodeVC.h"
@interface RegisterController ()
@property(nonatomic,strong)IBOutlet UITextField *nameTextFeild;
@property(nonatomic,strong)IBOutlet UITextField *yanZhengMaTextFeild;
@property(nonatomic,strong)IBOutlet UIImageView *imageViewOfYanzhengma;
@property(nonatomic,strong) PhoneGetSMSImageResponse  *rsponseGetSMSImage;
@end

@implementation RegisterController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)clickResigerBtn:(id)sender {
    [self.view endEditing:YES];
    UIStoryboard* storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
    RegisterSecurityCodeVC* vc = [storyboard instantiateViewControllerWithIdentifier:@"RegisterSecurityCodeVC"];
    vc.rsponseGetSMSImage = self.rsponseGetSMSImage;
    vc.name = self.nameTextFeild.text;
    vc.code = self.yanZhengMaTextFeild.text;
    [self.navigationController pushViewController:vc animated:YES];

//    RegitsterNormalRequest *request = [RegitsterNormalRequest request];
//    request.DY_userName = _nameTextFeild.text;
//    request.DY_password = _yanZhengMaTextFeild.text;
//    [request requstWithCompletionHandler:^(DYResponse *rs, NSError *error) {
//        if (error){
//            [MJAlertView showMessage:[error dy_description]];
//            return ;
//        }
//        [self.navigationController popViewControllerAnimated:YES];
//    }];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
